function main(defaultParams) {
    let self = this;
    debugger
    api.EXEC_FORMULA("TREE_QUERY_CHILDRENS('a1d14385-eb38-4adf-8877-67d1d1cfebf6','" + defaultParams.id + "',['unit_id'])").then((res) => {

        let pageTableList = self.$$("page_widget_list_d10gbu");
        let pageTableList1 = self.$$("page_widget_list_dczgvs");

        if (pageTableList && pageTableList.dataEngine && pageTableList.dataEngine.state) {
            const tableComp = pageTableList.dataEngine.state.getElement("table_84qcsw");
            const tableComp1 = pageTableList1.dataEngine.state.getElement("table_84qcsw");

            if (tableComp) {

                selectByUnitId(pageTableList, res.result)
                selectByUnitId(pageTableList1, res.result)

                tableComp.onRefresh();
                tableComp1.onRefresh();
            }
        }

    }).catch(err => {
        self.$message.error(err.message); // 显示错误提示信息
    });
}



/**
 * 通过部门进行过滤
 * @param {*} pageTableList
 * @param {*} unit_id
 */
function selectByUnitId(pageTableList, unit_id) {

    var members = pageTableList.dataEngine.state.layout.props.dataSet.filterData.filter.members

    members = members.filter(function (item) {
        return item.uniqueIdentify !== "unitIdFilter";
    });

    members.push({
        "uniqueIdentify": "unitIdFilter",
        field: "70e3a5e3-0d33-47e0-a582-b6192c2dfeff",
        fieldName: "unit_id",
        "fieldType": "TYPE_INTEGER",
        valueType: "Constant",
        values: unit_id || [],
        value: "",
        operate: "In", // 范围查询
        className: "Single",
        treeUnitIdFiter: "1"
    });
    var filter = {
        "combine": "And",
        "className": "List",
        "members": members
    };

    pageTableList.dataEngine.state.layout.props.dataSet.filterData = {
        "enabled": true,
        "filter": filter,
        "filterType": "FILTER",
        "rawCondition": {},
        "rawFormula": ""
    }

}
